<?php require_once('../../core/import.php');?>
<?php User::Permission('EXHIBITION_INDEX_LIST'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <script type="text/javascript" src="../../scripts/import.js"></script>
    <script type="text/javascript" src="../../scripts/components/checkbox/import.checkbox.js"></script>
    <script type="text/javascript" src="../../scripts/components/zebra_table/import.zebra_table.js"></script>
    <script type="text/javascript" src="scripts/list.js"></script>
</head>

<body>
    <form id="Form_select" name="Form_select" method="post" action="list.php">
    <table width="98.5%" border="0" cellpadding="0" cellspacing="0" class="List">
    <thead>
    <tr>
        <th width="8%" height="25" align="right" valign="middle">标题：&nbsp; </th>
        <th width="20%" height="25" align="left" valign="middle"><input type="text" name="Keyword" /></th>
        <th width="20%" height="25" align="left" valign="middle">&nbsp;</th>
        <th width="32%" height="25" align="left" valign="middle"><input type="submit" value="搜 索" /></th>
    </tr>
    </thead>
    </table>
    </form>
    <table width="98.5%" id="List" border="0" cellpadding="0" cellspacing="0" class="List">
    <thead>
    
    <tr>
        <th width="5%" height="25" align="center" valign="middle">选取</th>
        <th width="30%" align="left" valign="middle">&nbsp;会展公司</th>
        <th width="20%" align="center" valign="middle">链接地址</th>
         <th width="20%" align="center" valign="middle">是否显示</th>
        <th width="20%" align="center" valign="middle">发布时间</th>
        <th width="9%" align="center" valign="middle">&nbsp;</th>
    </tr>
    </thead>    
    <tbody>
    <form id="Form1" name="Form1" method="post" action="list.action.batch_delete.php">
    <?php
        #获取数据
	  $Keyword=Functions::HttpArgs('Keyword');
	  $Wheres="where 1=1 ";
	  if($Keyword)
	      {
		  $Wheres=$Wheres." and Title like '%$Keyword%' ";
	 	}
	  $Orders=$Wheres.'order by DateTime desc';	
        $Data=DB::GetData('select ID,Title,URL,DateTime,Logo,Isdisplay from `exhibition_index` '.$Orders.' limit ?,15');
        foreach($Data['Record'] as $Row)
        {
    ?>
    <tr>
        <td height="25" align="center" valign="middle">
            <input id="ID" name="ID[]" type="checkbox" value="<?php echo $Row['ID']; ?>" class="Cursor_Pointer" />
        </td>
        <td height="25" valign="middle">
            &nbsp;<?php echo Functions::SubStr($Row['Title'],40); ?><?php if($Row['Logo']){ echo '<font color="#FF6600">【图】</font>'; }?>
        </td>
        <td height="25" align="center" valign="middle">
            <?php echo Functions::SubStr($Row['URL'],60); ?>
        </td>
        <td height="25" align="center" valign="middle">
            <?php 
				$sv=$Row['Isdisplay']==1 ? '是' : '否';
				echo $sv;
			?>
        </td>
        <td height="25" align="center" valign="middle">
            <?php echo $Row['DateTime'];?>
        </td>
        <td height="25" align="center" valign="middle">
            <a href="edit.php?id=<?php echo $Row['ID']; ?>">编辑</a>
            <a href="javascript:mconfirm_delete('list.action.delete.php?id=<?php echo $Row['ID']?>');">删除</a>
        </td>
    </tr>
    <?php
        }
    ?>
    </form>
    </tbody>    
    <tfoot>
    <tr>
        <td height="25" colspan="6" align="center" valign="middle">
            <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td width="55%" align="left">
                <?php
                    PagerFactory::Create('Simple')->Display($Data,array
			  (
			  	'Parameters'=>array(
					'Keyword'=>$Keyword,
				)
				
			  ));
                ?>
                </td>
                <td width="45%" align="right">
                    <span id="SelectAll" class="Cursor_Pointer">全选</span>/<span id="UnSelectAll" class="Cursor_Pointer">全不选</span>
                    选中项：<span id="Delete" class="Cursor_Pointer">删除</span>
                </td>
            </tr>
            </table>    
         </td>
	</tr>
    </tfoot>    
    </table>
</body>
</html>